.TH std::experimental::latch 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::experimental::latch \- std::experimental::latch

.SH Synopsis
   Defined in header <experimental/latch>
   class latch;                            (concurrency TS)

   The latch class is a downward counter of type ptrdiff_t which can be used to
   synchronize threads. The value of the counter is initialized on creation. Threads
   may block on the latch until the counter is decremented to zero. There is no
   possibility to increase or reset the counter, which makes the latch a single-use
   barrier.

   Unlike std::experimental::barrier, std::experimental::latch can be decremented by a
   participating thread more than once.

.SH Member functions

   constructor         constructs a latch
                       \fI(public member function)\fP
   destructor          destroys the latch
                       \fI(public member function)\fP
   operator=           not copy-assignable
   [deleted]           \fI(public member function)\fP
   count_down_and_wait decrements the counter by 1 and blocks until it reaches zero
                       \fI(public member function)\fP
   count_down          decrements the counter in a non-blocking manner
                       \fI(public member function)\fP
   is_ready            tests if the internal counter equals zero
                       \fI(public member function)\fP
   wait                blocks until the counter reaches zero
                       \fI(public member function)\fP
